@using StardewModdingAPI.Web.Framework
@model StardewModdingAPI.Web.ViewModels.IndexModel
@{
    ViewData["Title"] = "SMAPI";
    ViewData["ViewTitle"] = string.Empty;
}
@section Head {
    <link rel="stylesheet" href="@Url.ContentWithCacheBust("~/Content/css/index.css")" />
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1" crossorigin="anonymous"></script>
    <script src="@Url.ContentWithCacheBust("~/Content/js/index.js")"></script>
}

<h1>
    SMAPI
    <img id="pufferchick" src="Content/images/pufferchick.svg" />
</h1>
<div id="blurb">
    <p>The mod loader for Stardew Valley.</p>
    <p>Compatible with GOG/Steam achievements and Linux/macOS/Windows, uninstall anytime, and there's a friendly community if you need help.</p>
</div>

<div id="call-to-action">
    <div class="cta-dropdown">
        <a href="@Model.StableVersion.DownloadUrl" class="main-cta download">Download SMAPI @Model.StableVersion.Version</a><br />
        <div class="dropdown-content">
            <a href="https://www.nexusmods.com/stardewvalley/mods/2400"><img src="Content/images/nexus-icon.svg" /> Download from Nexus</a>
            <a href="https://www.curseforge.com/stardewvalley/utility/smapi"><img src="Content/images/curseforge-icon.svg" /> Download from CurseForge</a>
            <a href="@Model.StableVersion.WebUrl"><img src="Content/images/github-logo.svg" /> Download from GitHub</a>
        </div>
    </div>
    <div><a href="https://stardewvalleywiki.com/Modding:Player_Guide" class="secondary-cta">Player guide</a></div>
    @if (Model.OtherBlurb != null)
    {
        <div>@Html.Raw(Markdig.Markdown.ToHtml(Model.OtherBlurb))</div>
    }
</div>

<div class="area">
    <h2 id="help">Get help</h2>
    <ul>
        <li><a href="https://smapi.io/community">Ask on Discord</a></li>
        <li><a href="https://reddit.com/r/SMAPI">Ask on Reddit</a></li>
        <li><a href="@Url.PlainAction("Index", "Mods")">Mod compatibility list</a></li>
    </ul>
    (Or join the community!)
</div>

<div class="area">
    <h2 id="whatsnew">What's new</h2>
    <div class="github-description">
        @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description))
    </div>
    <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@Url.PlainAction("Index", "Mods")">mod compatibility list</a> for more info.</p>
</div>

<div class="area">
    <h2 id="donate">Support SMAPI ♥</h2>
    <p>
        SMAPI is an open-source project by Pathoschild. It will always be free, but donations
        are much appreciated to help pay for development, server hosting, domain fees, coffee, etc.
    </p>

    <ul id="donate-links">
        <li>
            <a href="https://www.patreon.com/pathoschild" class="donate-button">
                <img src="Content/images/patreon.svg" /> Become a patron
            </a>
        </li>
        <li>
            <a href="https://ko-fi.com/pathoschild" class="donate-button">
                <img src="Content/images/ko-fi.svg" /> Buy me a coffee
            </a>
        </li>
        <li>
            <a href="https://www.paypal.me/pathoschild" class="donate-button">
                <img src="Content/images/paypal.svg" /> Donate via PayPal
            </a>
        </li>
    </ul>

    @if (!string.IsNullOrWhiteSpace(Model.SupporterList))
    {
        @Html.Raw(Markdig.Markdown.ToHtml(
            $"Special thanks to {Model.SupporterList}, and a few anonymous users for their ongoing support on Patreon; you're awesome!"
        ))
    }
</div>

<h2 id="modcreators">For mod creators</h2>
<ul>
    <li><a href="@Model.StableVersion.DevDownloadUrl">SMAPI @Model.StableVersion.Version for developers</a> (includes <a href="https://docs.microsoft.com/en-us/visualstudio/ide/using-intellisense">intellisense</a> and full console output)</li>
    <li><a href="https://stardewvalleywiki.com/Modding:Index">Modding documentation</a></li>
    <li><a href="https://github.com/Pathoschild/SMAPI">Source code</a></li>
</ul>
